#include <sys/time.h>
#include "syscall.h"

extern "C" int gettimeofday(struct timeval *tp, void *tzp)
{
	int ret;
	__asm__ __volatile__(
		"int $0x90\t\n"
		"movl %%eax, %0"
		:"=m"(ret)
		:"a"(SYSCALL_GETTIMEOFDAY), "b"(tp), "c"(tzp)
	);

	tp->tv_sec = ret;

	return 0;
}

